<%@ include file="lib.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/css/admin.css">
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<title>Administrator Video</title>
</head>
<body>
<table border="1" height="100%">
	<tr>
		<td id="left_menu" >
			<%@include file="admin_left.jsp" %>
		</td>
		
		<td id="content" width="100%" valign="top">
			<c:if test="${action ==0}">
			<div id="content_action">
			<a href="?action=new">Add</a>
			Filter:<select name="Category_key">
					<option value=0>Date</option>
					<option value=1>Like Best</option>
					<option value=2>View Best</option>
					<option value=3>Is on FaceBook</option>
					<option value=4>Video Error</option>
					</select>
			</div>
			<div id="htmldata">
				<c:forEach var="data" items="${datalist}">	
					<div class="content_item">
                        <div id="title">${data.title}</div>
                        <img src="${data.image_Url}" width="120px" height="90px"/>					
                        <div >
                        <a href="?action=edit&Embed_code=${data.embed_code}">edit</a> 
                        <a href="JavaScript:ajax('?action=delete&Embed_code=${data.embed_code}','htmldata')">delete</a>
                        </div>
                    </div>
				</c:forEach>
			</div>
				
			</c:if>
			<c:if test="${action ==1}"><%@include file="admin_video_form.jsp" %></c:if>
			<c:if test="${action ==2}"><%@include file="admin_video_form.jsp" %></c:if>
		</td>
	</tr>
</table>
</body>
</html>